package com.ruoyi.workorder.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.workorder.domain.WorkOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 工单Service接口
 * 
 * @author renyuxin
 * @date 2024-05-28
 */
public interface IWorkOrderService 
{
    /**
     * 查询工单
     * 
     * @param woId 工单主键
     * @return 工单
     */
    public WorkOrder selectWorkOrderByWoId(Long woId);

    /**
     * 查询工单列表
     * 
     * @param workOrder 工单
     * @return 工单集合
     */
    public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder);

    /**
     * 新增工单
     * 
     * @param workOrder 工单
     * @return 结果
     */
    public int insertWorkOrder(WorkOrder workOrder);

    /**
     * 修改工单
     * 
     * @param workOrder 工单
     * @return 结果
     */
    public int updateWorkOrder(WorkOrder workOrder);

    /**
     * 批量删除工单
     * 
     * @param woIds 需要删除的工单主键集合
     * @return 结果
     */
    public int deleteWorkOrderByWoIds(Long[] woIds);

    /**
     * 删除工单信息
     * 
     * @param woId 工单主键
     * @return 结果
     */
    public int deleteWorkOrderByWoId(Long woId);

    List<String> hasRelated(Long woCatalogId);


    List<WorkOrder> selectWorkOrderListForUser(WorkOrder workOrder,Long userId);


    boolean checkNameUnique(WorkOrder workOrder);

    /**
     * 问题统计 饼状图
     * @param projectId
     * @return
     */
    List<Map<String, Object>> listProblemStatistics(Long projectId);
}
